<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<div class="row">
	<div class="col-lg-12 col-sm-12 col-xs-12">
		<div class="widget">
			<div class="widget-header bordered-bottom theme">
				<span class="widget-caption">接口参数-${(editModel=='add')?string('新增','编辑')}</span>
				<div class="widget-buttons">
					<a href="#" data-toggle="collapse">
						<i class="fa fa-minus"></i>
					</a>
					<a href="#" data-toggle="maximize">
						<i class="fa fa-expand"></i>
					</a>
				</div>
			</div>
			<div class="widget-body">
				<div class="row">
					<form class="editForm" action="${saveUrl}" method="post" responseType="JSON" role="form" id="editForm_${serializeNum}"
						data-bv-submitButtons="#editFormSubmitBtn_${serializeNum}"
						data-bv-message="This value is not valid"
						data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
						data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
						data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
						<input type="hidden" name="formKey" value="${formKey}">
						<input type="hidden" name="formToken" value="${formToken}">
							<input type="hidden" name="id" value="${editEntity.id}">
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label class="col-sm-2 control-label no-padding-right">接口名称</label>
									<div class="col-sm-10">
										<select required="required" data-bv-message="请选择接口文档" name="documentId" class="selectpicker_${serializeNum}" data-live-search="true">
										<optgroup label="选择接口接口文档" data-icon="icon-ok">
											<#list documentId_datasources as datasources >
											<option value="${datasources.id}">${datasources.name}</option>
											</#list>
										</optgroup>
										</select>
										<script type="text/javascript">
											$("[name='documentId']").val("${editEntity.documentId}");
										</script>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="dataStructure" class="col-sm-2 control-label no-padding-right">参数数据结构</label>
									<div class="col-sm-10">
										<select required="required" data-bv-message="请选择数据结构类型" name="dataStructure" class="selectpicker_${serializeNum}" alt="参数数据结构" id="dataStructure" placeholder="参数数据结构" data-live-search="true">
											<optgroup label="选择所属分组" data-icon="icon-ok">
												<@dictionary groupCode="dataTypes";dics>
													<#list dics as dic>
														<option value="${dic.code}">${dic.value}</option>
													</#list>
												</@dictionary>
											</optgroup>
										</select>
										<script type="text/javascript">
                                            $("[name='dataStructure']").val("${editEntity.dataStructure}");
										</script>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
								<div class="col-xm-12 col-sm-6 col-lg-4">
									<div class="form-group">
										<label for="type" class="col-sm-2 control-label no-padding-right">参数类型</label>
										<div class="col-sm-10">
											<select required="required" data-bv-message="请选择参数类型" name="type" class="selectpicker_${serializeNum}" alt="参数类型" id="type" placeholder="参数类型" data-live-search="true">
												<optgroup label="请选择参数类型" data-icon="icon-ok">
													<option value="input">输入参数</option>
													<option value="output">输出参数</option>
												</optgroup>
											</select>
											<script type="text/javascript">
												$("[name='type']").val("${editEntity.type}");
											</script>
										</div>
									</div>
								</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="paramName" class="col-sm-2 control-label no-padding-right">参数名</label>
									<div class="col-sm-10">
										<input required="required" data-bv-message="请输入参数名" maxlength="50" name="paramName" alt="参数名" id="paramName" placeholder="参数名" type="text" title="参数名" class="form-control"  value="${editEntity.paramName}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="defaultValue" class="col-sm-2 control-label no-padding-right">默认值</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="255" name="defaultValue" alt="默认值" id="defaultValue" placeholder="默认值" type="text" title="默认值" class="form-control"  value="${editEntity.defaultValue}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="remark" class="col-sm-2 control-label no-padding-right">参数描述</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="500" name="remark" alt="参数描述" id="remark" placeholder="参数描述" type="text" title="参数描述" class="form-control"  value="${editEntity.remark}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="createTime" class="col-sm-2 control-label no-padding-right">创建时间</label>
									<div class="col-sm-10">
										<span class="input-icon icon-left">
											<input data-bv-date-format="YYYY-MM-DD hh:mm:ss" data-bv-message="The field is not valid" data-bv-date-message="请正确输入一个时间" data-bv-date="true"maxlength="19" name="createTime" alt="创建时间" id="createTime" placeholder="创建时间" type="text" title="创建时间" class="form-control form-control date-picker" onfocus="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})"  value="${editEntity.createTime}"/>
											<i class="fa fa-calendar"></i>
										</span>
									</div>
								</div>
							</div>
							</#if>
							<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="createUserId" class="col-sm-2 control-label no-padding-right">创建Id</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="32" name="createUserId" alt="创建Id" id="createUserId" placeholder="创建Id" type="text" title="创建Id" class="form-control"  value="${editEntity.createUserId}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="example" class="col-sm-2 control-label no-padding-right">举例</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="100" name="example" alt="举例" id="example" placeholder="举例" type="text" title="举例" class="form-control"  value="${editEntity.example}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="version" class="col-sm-2 control-label no-padding-right">版本</label>
									<div class="col-sm-10">
										<input  data-bv-integer-message="The field is number" data-bv-message="The field is not valid" data-bv-integer="true"maxlength="11" name="version" alt="版本" id="version" placeholder="版本" type="text" title="版本" class="form-control"  value="${editEntity.version}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
								<div class="col-xm-12 col-sm-6 col-lg-4">
									<div class="form-group has-feedback">
										<label for="isRequired" class="col-sm-2 control-label no-padding-right">是否必须</label>
										<div class="col-sm-10">
											<input type="hidden" name="isRequired" value=${(editEntity.isRequired???string(editEntity.isRequired?string('true','false'),'false'))!'false'}>
											<label>
												<input data-target-input-name="isRequired" data-bv-message="The field is not valid"maxlength="1" alt="是否必须" id="isRequired" placeholder="是否必须" type="checkbox" title="是否必须" class="form-control checkbox-slider slider-icon yesno"  ${(editEntity.isRequired???string(editEntity.isRequired?string('checked',''),''))!''}>
												<span class="text"></span>
											</label>
										</div>
									</div>
								</div>
							</#if>
						<div class="col-sm-12">
							<input type="button" class="btn btn-default" data-dismiss="modal" value="返回" onclick="backView()"/>
							<button type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">保存</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="assets/js/validation/bootstrapValidator_init.js"></script>
<script>
$(".selectpicker_${serializeNum}").select2();
</script>